<template>
  <div v-loading="loading">
    <el-form ref="form" :model="form" :rules="rules" label-width="120px" class="dataForm">
      <el-row>
        <el-col :span="8">
          <el-form-item :label="$t('证券万得代码')" prop="prop1">
            <el-input v-model="form.prop1" :placeholder="$t('证券万得代码')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('证券名称')" prop="prop2">
            <el-input v-model="form.prop2" :placeholder="$t('证券万得代码')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('数量')" prop="prop3">
            <el-input v-model="form.prop3" :placeholder="$t('证券万得代码')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('价格模式')" prop="prop4">
            <el-radio-group v-model="form.prop4">
              <el-radio :label="1">收益率</el-radio>
              <el-radio :label="2">净价</el-radio>
              <el-radio :label="3">全价</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('收益率(%)')" prop="prop5">
            <el-input-number v-model="form.prop5" :placeholder="$t('收益率(%)')" :controls="false" :precision="2" :max="100" :min="0" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('交易净价(元)')" prop="prop6">
            <money v-model="form.prop6" :placeholder="$t('交易净价(元)')" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('交易全价(元)')" prop="prop25">
            <money v-model="form.prop25" :placeholder="$t('交易全价(元)')" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('交易市场')" prop="prop7">
            <el-select v-model="form.prop7" :placeholder="$t('交易市场')" disabled>
              <el-option value="1" label="银行间" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('债券类型')" prop="prop8">
            <el-select v-model="form.prop8" :placeholder="$t('债券类型')" disabled>
              <el-option value="1" label="利率债" />
              <el-option value="2" label="投资级债" />
              <el-option value="3" label="高收益债" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('债券类型')" prop="prop9">
            <el-select v-model="form.prop9" :placeholder="$t('债券类型')" disabled>
              <el-option value="1" label="国债" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('卖出产品')" prop="prop10">
            <el-select v-model="form.prop10" :placeholder="$t('卖出产品')">
              <el-option value="1" label="CF INDUSTRIES20债" />
              <el-option value="2" label="KWGPRO 7.4 03/05/24" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('反手黑名单')" prop="prop11">
            <el-select v-model="form.prop11" :placeholder="$t('反手黑名单')" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('交易对手')" prop="prop12">
            <el-input v-model="form.prop12" :placeholder="$t('交易对手')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('买入产品')" prop="prop13">
            <el-select v-model="form.prop13" :placeholder="$t('债券类型')">
              <el-option value="1" label="CF INDUSTRIES20债" />
              <el-option value="2" label="KWGPRO 7.4 03/05/24" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('反手黑名单')" prop="prop14">
            <el-select v-model="form.prop14" :placeholder="$t('反手黑名单')" disabled />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('过券机构')" prop="prop15">
            <el-input v-model="form.prop15" :placeholder="$t('过券机构')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('过券费用(厘)')" prop="prop16">
            <el-input v-model="form.prop16" :placeholder="$t('过券费用(厘)')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('付费机构')" prop="prop17">
            <el-radio-group v-model="form.prop17">
              <el-radio :label="1">买方</el-radio>
              <el-radio :label="2">卖方</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('过券负责人')" prop="prop18">
            <user-select
              v-model="form.prop18"
              :placeholder="$t('过券负责人')"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('交易类型')" prop="prop19">
            <el-select v-model="form.prop19" :placeholder="$t('交易类型')">
              <el-option value="1" label="买入" />
              <el-option value="2" label="卖出" />
              <el-option value="3" label="拆借" />
              <el-option value="4" label="其他" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('交易负责人')" prop="prop20">
            <user-select
              v-model="form.prop20"
              :placeholder="$t('交易负责人')"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('协议号')" prop="prop21">
            <el-input v-model="form.prop21" :placeholder="$t('协议号')" show-word-limit maxlength="100" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('面额') + $t('金额单位')" prop="prop22">
            <money v-model="form.prop22" :placeholder="$t('面额') + $t('金额单位')" unit="w" />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('结算金额(元)')" prop="prop23">
            <money v-model="form.prop23" :placeholder="$t('结算金额(元)')" />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item :label="$t('备注')" prop="prop24">
            <el-input v-model="form.prop24" type="textarea" :placeholder="$t('备注')" show-word-limit maxlength="1000" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'TransactionApplicationForm',
  data() {
    return {
      form: {
        prop1: undefined,
        prop2: undefined,
        prop3: undefined,
        prop4: 1,
        prop5: undefined,
        prop6: undefined,
        prop7: '1',
        prop8: '1',
        prop9: '1',
        prop10: undefined,
        prop11: undefined,
        prop12: undefined,
        prop13: undefined,
        prop14: undefined,
        prop15: undefined,
        prop16: undefined,
        prop17: 1,
        prop18: undefined,
        prop19: '4',
        prop20: undefined,
        prop21: undefined,
        prop22: undefined,
        prop23: undefined,
        prop24: undefined,
        prop25: undefined
      },
      loading: false,
      rules: {}
    }
  },
  created() {
    this.$bus.$emit('async_done')
  },
  methods: {
    init(data) {
      console.log(data)
    }
  }
}
</script>

<style scoped>

</style>
